package com.example.entity;

import lombok.Data;

import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @TableName message
 */
@Table(name = "message")
@Data
public class Message implements Serializable {
    private Integer id;

    private Integer senderId;

    private Integer receiverId;

    private String content;

    private String timestamp;

    @Transient
    private UserInfo sender;

    @Transient
    private UserInfo receiver;

    /**
     * 标识是消费者还是管理员
     */
    @Transient
    private String senderName;

    private static final long serialVersionUID = 1L;
}